<template>
  <div>
    <el-dialog :visible.sync="pdfVisible" :before-close="handleClose" width="80%">
      <pdf ref="pdf" :src="url" />
    </el-dialog>
  </div>
</template>

<script>
import pdf from "vue-pdf";
export default {
  props: ["url"],
  components: { pdf },
  data() {
    return {
      pdfVisible: false,
    };
  },
  methods: {
    open() {
      this.pdfVisible = true;
    },
    handleClose() {
      this.pdfVisible = false;
    },
  },
};
</script>

<style></style>
